package com.homework.sensorapplication;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        Button buttonToAccel=(Button) findViewById(R.id.button_accel);
        Button buttonToSensors=(Button) findViewById(R.id.button_sensors);
        Button buttonToCompass=(Button) findViewById(R.id.button_compass);
        buttonToAccel.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent=new Intent(MainActivity.this,AccelSimulatorTest.class);
                startActivity(intent);
            }
        });
        buttonToSensors.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent=new Intent(MainActivity.this,SensorsActivity.class);
                startActivity(intent);
            }
        });
        buttonToCompass.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent=new Intent(MainActivity.this,Compass.class);
                startActivity(intent);
            }
        });
    }
}
